<?php

namespace S3\Sample3Bundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ConnectionType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('accountid')
            ->add('providerid')
            ->add('accesstoken')
            ->add('secret')
            ->add('refreshtoken')
            ->add('provideraccountid')
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'S3\Sample3Bundle\Entity\Connection'
        ));
    }

    public function getName()
    {
        return 's3_sample3bundle_connectiontype';
    }
}
